package cn.com.surker.sale.dao;

import cn.com.surker.sale.entity.SaleContractPayment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 销售项目收款表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2024-05-20
 */
public interface SaleContractPaymentDao extends BaseMapper<SaleContractPayment> {

    /**
     * 查询回款记录中的销售人员
     * @param orgId
     * @return
     */
    List<Map<String, Object>> findSales(Long orgId);

    /**
     * 统计累计付款
     * @param startTime
     * @param endTime
     * @param orgId
     * @param conId
     * @return
     */
    List<SaleContractPayment> totalPayment(String startTime, String endTime, Long orgId, Long conId);

    List<SaleContractPayment> findSumMoney(String searchVal, Long orgId, Integer type, Integer isPrint, Integer isReport,
                                           String sale, String startTime, String endTime);
}
